/*
 * ViewCart.java
 *
 * Created on April 5, 2007, 5:05 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package edu.byu.isys413.actions;

import Data.TransactionBO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 *
 * @author Dallin Regehr
 */
public class ViewCart implements edu.byu.isys413.web.Action{
    
    /** Creates a new instance of ViewCart */
    public ViewCart() {
    }
    public String process(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpSession session = request.getSession();
        TransactionBO trans = (TransactionBO)session.getAttribute("transaction");
        if(trans == null) {
            request.setAttribute("message", "Big error, no transaction was found. How did you get" +
                    "to this point without a transaction being made?");
            //return "startpage.jsp";
        }
                
        return "viewCart.jsp";
    }
}
